<template>
    <div class="zichan">
        <ziHead :ishead="ishead" @toggleMode="toggleMode"></ziHead>
        <div class="zicontent">

            <div class="zitwo">
                <div class="zitwotit">
                    <div class="ztwoitems" :class="istou == 1 ? 'ztacitve' : ''" @click="istouClick(1)">
                        <span class="rengou">当前委托</span>
                        <span class="renxian"></span>
                    </div>
                    <div class="ztwoitems" :class="istou == 2 ? 'ztacitve' : ''" @click="istouClick(2)">
                        <span class="rengou">历史委托</span>
                        <span class="renxian"></span>
                    </div>
                    <div class="ztwoitems" :class="istou == 3 ? 'ztacitve' : ''" @click="istouClick(3)">
                        <span class="rengou">当前仓位</span>
                        <span class="renxian"></span>
                    </div>
                    <div class="ztwoitems" :class="istou == 4 ? 'ztacitve' : ''" @click="istouClick(4)">
                        <span class="rengou">历史仓位</span>
                        <span class="renxian"></span>
                    </div>

                </div>
                <div class="leiitem">
                    <div class="leiname lactive">限价｜市价</div>
                    <div class="leiname">高级限价委托</div>
                    <div class="leiname">止盈止损</div>
                </div>
                <div class="ztlist">
                    <div class="zonenew">
                        <div class="newitem">

                            <div class="zthead">
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">委托时间</span>
                                    </div>
                                    
                                </div>
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">交易类型</span>
                                    </div>
                                </div>
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">交易品种</span>
                                    </div>
                                </div>
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">仓位类型</span>
                                    </div>
                                </div>
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">交易方向</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">成交均价 | 委托价</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">已成交 | 委托总量</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">已成交 | 委托价值</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">收益 | 收益率</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">手续费</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">止盈止损</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">只减仓</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">订单状态</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">操作</span>
                                    </div>
                                </div>

                            </div>
                            <div class="zthead ztitems" v-for="(item,index) in 10" :key="index">
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">2023/01/01</span>
                                    </div>
                                </div>
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">币币</span>
                                    </div>
                                    
                                </div>
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">btc/usdt</span>
                                    </div>
                                    
                                </div>
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">--</span>
                                    </div>
                                </div>
                                <div class="zonetwos">
                                    <div class="nei">
                                        <span class="rentit">买入</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">29，256.3 USDT 市价</span>
                                    </div>
                                   
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">29，256.3 USDT 市价</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">$91.09 | $91.09</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">--</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">--</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">--</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">--</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="rentit">--</span>
                                    </div>
                                </div>
                                <div class="zonetwos end">
                                    <div class="nei">
                                        <span class="chakan">查看详情</span>
                                    </div>
                                </div>

                            </div>

                        </div>
                        <!-- <div class="rcao">
                            <div class="caoview">
                                <div class="zonetwos end caozuo">
                                    <span class="rentit">操作</span>
                                </div>
                            </div>
                            <div class="caoview">
                                <div class="zonetwos end caozuo">
                                    <span class="chakan">查看详情</span>
                                </div>
                            </div>
                        </div> -->
                    </div>



                    <!-- <div class="zthead ztitems">
                            <div class="zonetwos center">
                                <img src="@/assets/img/addition/usdt.png" alt="" class="usdticon" />
                                <span class="rentit">USDT</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">活期</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">0.01 ABC</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">0.1%</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">12.001 ABC</span>
                            </div>
                            <div class="zonetwos end">
                                <span class="rentit">2023-01-01</span>
                            </div>
                            <div class="zonetwos end">
                                <span class="rentit">2023-02-01</span>
                            </div>
                            <div class="zonetwos end">
                                <span class="shuhui">赎回</span>
                            </div>

                        </div>
                        <div class="zthead ztitems">
                            <div class="zonetwos center">
                                <img src="@/assets/img/addition/usdt.png" alt="" class="usdticon" />
                                <span class="rentit">USDT</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">活期</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">0.01 ABC</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">0.1%</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">12.001 ABC</span>
                            </div>
                            <div class="zonetwos end">
                                <span class="rentit">2023-01-01</span>
                            </div>
                            <div class="zonetwos end">
                                <span class="rentit">2023-02-01</span>
                            </div>
                            <div class="zonetwos end">
                                <span class="rentit lv">进行中</span>
                            </div>

                        </div>
                        <div class="zthead ztitems">
                            <div class="zonetwos center">
                                <img src="@/assets/img/addition/usdt.png" alt="" class="usdticon" />
                                <span class="rentit">USDT</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">活期</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">0.01 ABC</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">0.1%</span>
                            </div>
                            <div class="zonetwos">
                                <span class="rentit">12.001 ABC</span>
                            </div>
                            <div class="zonetwos end">
                                <span class="rentit">2023-01-01</span>
                            </div>
                            <div class="zonetwos end">
                                <span class="rentit">2023-02-01</span>
                            </div>
                            <div class="zonetwos end">
                                <span class="rentit">已完成</span>
                            </div>

                        </div> -->
                </div>
            </div>
        </div>
</div>
</template>
  
<script>
import { ref } from 'vue';
import Meun from "@/components/menu/meun.vue";
import ziHead from '@/views/property/components/ziHead.vue';
export default {
    name: "Invest",
    components: { ziHead },
    data() {
        return {
            modal1: false,
            ishead: 2,
            iseye: false,
            istou: 2
        };
    },
    mounted() {
        // autofit.init({
        //   dh: 950,
        //   dw: 1200,
        //   el: "#app",
        //   resize: true
        // });
        // let devicewidth = document.documentElement.clientWidth//获取当前分辨率下的可是区域宽度
        //   let scale = devicewidth / 1920 // 分母——设计稿的尺寸
        //   document.body.style.zoom = scale//放大缩小相应倍数
        // },
    },
    setup() {
    },
    methods: {
        toggleMode(e) {
            // console.log(e)
            this.ishead = e
        },
        istouClick(e) {
            this.istou = e
        }
    }
};
//   const ishead = ref('0');
//   const toggleMode = (e) => {
//     ishead.value = e;
//   };
</script>
  
<style lang="scss" scoped>
.zicontent {
    padding: 20px 20%;
    display: flex;
    flex-direction: column;

    .zione {
        display: flex;
        flex-direction: row;

        .zioneleft {
            border: 1px solid #EEEEEE;
            border-radius: 4px;
            padding: 30px 21px;
            // width: 520px;
            width: 100%;

            .zleftone {
                display: flex;
                flex-direction: row;
                align-items: center;

                .touview {
                    display: flex;
                    flex-direction: column;

                }

                .touone {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                }

                // width: 100%;
                .zongtit {
                    font-size: 18px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #111111;
                    display: inline-block;
                    margin-right: 10px;
                }

                .yan {
                    width: 19px;
                    height: 12px;
                    cursor: pointer;
                }

                .zoneright {
                    margin-left: auto;
                    display: flex;
                    flex-direction: column;

                    .shoutit {
                        font-size: 14px;
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        color: #999999;
                        display: block;
                        margin-bottom: 6px;
                    }

                    .shoutit:last-child {
                        margin-bottom: 0;
                    }

                    .lv {
                        color: #27C27B;
                    }
                }
            }

            .znum {
                font-size: 27px;
                font-family: Source Han Sans CN;
                font-weight: bold;
                color: #111111;
                display: block;
                margin: 9px 0 0px;

                .znums {
                    font-size: 19px;
                    font-weight: 400;
                    display: inline-block;
                    margin-left: 5px;
                }
            }

            .zjia {
                display: flex;
                flex-direction: row;
                align-items: center;

                .jianum {
                    font-size: 16px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #D04963;
                }

                .bannian {
                    display: inline-block;
                    color: #8B8B8B;
                    margin-left: 5px;
                }

                .zhouview {
                    margin-left: auto;
                    width: 190px;
                    height: 32px;
                    background: #F0F0F0;
                    border-radius: 4px;
                    padding: 3px;
                    display: flex;
                    flex-direction: row;
                    cursor: pointer;

                    .zhouitem {
                        width: 25%;
                        height: 100%;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        font-size: 11px;
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        color: #030000;
                    }

                    .zhactive {
                        background: #FFFFFF;
                        border-radius: 4px;
                        font-weight: 400;
                        color: #030000;
                    }
                }
            }

            .kxian {
                height: 200px;
            }
        }

    }

    .zitwo {
        // border: 1px solid #EEEEEE;
        border-radius: 3px;
        margin-top: 27px;

        .zitwotit {
            font-size: 16px;
            font-family: Source Han Sans CN;
            font-weight: 400;
            color: #000000;
            // margin: 15px 0;
            // padding: 15px 24px;
            border-bottom: 1px solid #EEEEEE;
            display: flex;
            flex-direction: row;

            .ztwoitems {
                height: 100%;
                margin-right: 30px;
                font-size: 15px;
                font-family: Source Han Sans CN;
                font-weight: 500;
                color: #999999;
                display: flex;
                align-items: center;
                justify-content: center;
                position: relative;
                padding: 16px 0;
                cursor: pointer;
            }

            .renxian {
                position: absolute;
                width: 100%;
                bottom: 0;
                left: 0;
                height: 1px;
                background: #030000;
                display: none;
            }

            .ztacitve {
                font-weight: 500;
                color: #000000;

                .renxian {
                    display: inline-block;

                }
            }
        }

        .ztlist {
            // padding:0 15px;
            padding: 30px 0;
            position: relative;

            .zonenew {
                width: 100%;
                display: flex;
                flex-direction: row;
                // white-space: nowrap;
                // overflow-x: scroll;
                // display: inline-block;
                // position: relative;
            }

            .newitem {
                width: 100%;
                position: relative;
                 white-space: nowrap;
                overflow-x: scroll;
                display: inline-block;
                position: relative;
            }

            .rcao {
                width: 10%;
                position: relative;

            }

            .caoview {
                width: 100%;
                display: flex !important;

                align-items: center;
                justify-content: center !important;
                // position: fixed;
                // height: 70px;
                // right: 0;
                // top: 0;
                .zonetwos {
                    cursor: pointer;
                    width: 140px;
                    display: inline-block;
                    text-align: center;
                    border-left: 1px solid #eee;
                    padding: 15px 8px;
                    border-bottom: 1px solid #eee;
                    // display: flex;
                    height: 70px;
                    line-height: 28px;
                    // flex-direction: row;
                }
               

                .caozuo {
                    font-size: 13px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #999999;
                }

                // .end{
                //     justify-content: flex-end;
                //     .rentit{
                //         padding-right: 3px;
                //     }
                // }
            }

            .zthead {
                // display: flex;
                // flex-direction: row;
                // margin-bottom: 38px;

                width: 90%;
                position: relative;
                padding-right: 100px;
                
                .zones {
                    width: 25%;
                    display: flex;
                    flex-direction: row;
                }

                .zonetwos {
                    width: 140px;
                    display: inline-block;
                    padding: 0px 10px;
                    // white-space: normal;
                    // word-break: break-all; 
                    // min-height: 60px;
                    // line-height: 18px;
                    border-bottom: 1px solid #eee;
                    height: 70px;
                   
                    // display: flex;
                    // flex-direction: row;
                }

                .caozuo {
                    position: fixed;
                    right: 0;

                }

                .end {
                    justify-content: flex-end;

                    .rentit {
                        padding-right: 3px;
                    }
                }

                .rentit {
                    font-size: 13px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #8B8B8B;
                    // white-space: normal;
                    // word-break: break-all; 
                    width: 100%;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    display: inline-block;
                }

                .hong {
                    font-weight: 400;
                    color: #EF5252 !important;
                }

                .usdticon {
                    width: 14px;
                    height: 14px;
                    margin-right: 5px;
                }

                .center {
                    align-items: center;
                }

                .shuhui {
                    width: 47px;
                    height: 23px;
                    border: 1px solid #030000;
                    border-radius: 12px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 9px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #000000;
                }

                .lv {
                    color: #31BD65 !important;
                }
                .flexcol{
                    .nei{
                        width: 100%;
                        height: 100%;
                        display: flex;
                        flex-direction: column;
                    }
                    // .rentits{
                    //     display: block;
                    //     font-size: 13px;
                    //     font-family: Source Han Sans CN;
                    //     font-weight: 400;
                    //     color: #000000;
                    //     // line-height: 20px;
                    // }

                }
            }
            .nei{
                display: flex;
                align-items: center;
                justify-content: center;
                height: 100%;
               
            }
            .chakan{
                    width: 45px;
                    height: 22px;
                    border: 1px solid #BEBEBE;
                    border-radius: 9px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 9px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #000000;
                    margin-top: 8px;
                    cursor: pointer;
                }

            .ztitems {
                // display: flex;
                // flex-direction: row;
                // align-items: center;

                .rentit {
                    font-size: 14px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #000000;
                }

               
            }

            .ztitems:last-child {
                border-bottom: none;
            }
        }

        .end {
            justify-content: flex-end;
            text-align: end;

            .rentit {
                padding-right: 0px;
            }
            .nei{
                justify-content: flex-end !important;
            }
        }
        .leiitem {
            display: flex;
            flex-direction: row;
            margin-top: 10px;

            .leiname {
                font-size: 10px;
                font-family: Source Han Sans CN;
                font-weight: 500;
                color: #999999;
                display: inline-block;
                padding: 6px 9px;
                border: 1px solid #F7F7F7;
                border-radius: 3px;
                margin-right: 10px;
                cursor: pointer;
            }

            .lactive {
                background: #F7F7F7;
                font-weight: 500;
                color: #000000 !important;

            }

        }

    }
}

.xiaclass {
    position: relative;
    top: 4px !important;
}</style>